<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			/*
			无论浏览器尺寸多大或者弹框尺寸多大都可以实现弹框垂直居中显示
			*/
			.a{
				position: fixed;
				top: 0;
				bottom: 0;
				right: 0;
				left: 0;
				background-color: rgba(0,0,0,.5);
				text-align: center;
				white-space: nowrap;
				z-index: 99;
				font-size: 0;
				overflow: hidden;
			}
			.a:after{
				content: '';
				display: inline-block;
				height: 100%;
				vertical-align: middle;
			}
			.b{
				height: 100px;
				width: 100px;
				display: inline-block;
				vertical-align: middle;
				border-radius: 6px;
				font-size: 14px;
				background-color: #fff;
				text-align: center;
				white-space: normal;
			}
		</style>
	</head>
	<body>
		<div class="a">
			<div class="b">
				我是帅哥
			</div>
		</div>
	</body>
</html>
